package com.share.dao.attach.advertise.impl;

import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.stereotype.Component;

import com.share.bean.attach.advertise.PositionSort;
import com.share.commons.base.dao.BaseDaoSupport;
import com.share.dao.attach.advertise.PositionSortDao;

@Component
public class PositionSortDaoImpl extends BaseDaoSupport<PositionSort> implements PositionSortDao {

	@Override
	public void deletePositionSortDao(int id) throws RuntimeException {
		this.deleteObject(PositionSort.class, id) ;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<PositionSort> findAllPositionSortDao(String hql ,LinkedHashMap<String , String> orderby) throws RuntimeException {
		return (List<PositionSort>) this.find(hql, orderby) ;
	}

	@Override
	public PositionSort loadByIdPositionSortDao(int id) throws RuntimeException {
		
		return this.loadById(PositionSort.class, id) ;
	}

	@Override
	public void savePositionSortDao(PositionSort ps) throws RuntimeException {
		this.saveObject(ps) ;

	}

	@Override
	public void updatePositionSortDao(PositionSort ps) throws RuntimeException {
		
		this.updateObject(ps) ;
	}

}
